package sudroid.android.views;

import android.util.DisplayMetrics;
import android.view.Display;
import sudroid.AssertUtil;
import sudroid.android.graphics.PixelFormatUtil;
import sudroid.android.graphics.SurfaceUtil;

public class DisplayUtil
{
  private static DisplayMetrics displayMetrics;

  /** @deprecated */
  private static DisplayMetrics getDisplayMetrics()
  {
    monitorenter;
    try
    {
      if (displayMetrics == null)
        displayMetrics = new DisplayMetrics();
      DisplayMetrics localDisplayMetrics = displayMetrics;
      monitorexit;
      return localDisplayMetrics;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  public static String printConstantDenstity()
  {
    StringBuilder localStringBuilder1 = new StringBuilder();
    StringBuilder localStringBuilder2 = localStringBuilder1.append("SurfaceRotation CONSTANTS:[");
    StringBuilder localStringBuilder3 = localStringBuilder1.append("\nDENSITY_DEFAULT : ").append(160);
    StringBuilder localStringBuilder4 = localStringBuilder1.append("\nDENSITY_HIGH : ").append(240);
    StringBuilder localStringBuilder5 = localStringBuilder1.append("\nDENSITY_MEDIUM : ").append(160);
    StringBuilder localStringBuilder6 = localStringBuilder1.append("\nDENSITY_LOW : ").append(120).append("\n]");
    StringBuilder localStringBuilder7 = localStringBuilder1.append("\n]");
    return localStringBuilder1.toString();
  }

  public static String toStringForDisplay(Display paramDisplay)
  {
    AssertUtil.checkNull(paramDisplay);
    DisplayMetrics localDisplayMetrics = getDisplayMetrics();
    paramDisplay.getMetrics(localDisplayMetrics);
    StringBuilder localStringBuilder1 = new StringBuilder();
    StringBuilder localStringBuilder2 = localStringBuilder1.append("display:{");
    StringBuilder localStringBuilder3 = localStringBuilder1.append("\nid : ");
    int i = paramDisplay.getDisplayId();
    StringBuilder localStringBuilder4 = localStringBuilder3.append(i);
    StringBuilder localStringBuilder5 = localStringBuilder1.append("\nwidth : ");
    int j = paramDisplay.getWidth();
    StringBuilder localStringBuilder6 = localStringBuilder5.append(j);
    StringBuilder localStringBuilder7 = localStringBuilder1.append("\nheight : ");
    int k = paramDisplay.getHeight();
    StringBuilder localStringBuilder8 = localStringBuilder7.append(k);
    StringBuilder localStringBuilder9 = localStringBuilder1.append("\norientation : ");
    int m = paramDisplay.getOrientation();
    StringBuilder localStringBuilder10 = localStringBuilder9.append(m);
    StringBuilder localStringBuilder11 = localStringBuilder1.append("\n");
    String str1 = SurfaceUtil.printConstantSurfaceRotation();
    StringBuilder localStringBuilder12 = localStringBuilder11.append(str1);
    StringBuilder localStringBuilder13 = localStringBuilder1.append("\npixel format : ");
    int n = paramDisplay.getPixelFormat();
    StringBuilder localStringBuilder14 = localStringBuilder13.append(n);
    StringBuilder localStringBuilder15 = localStringBuilder1.append("\n");
    String str2 = PixelFormatUtil.printConstantPixelFormat();
    StringBuilder localStringBuilder16 = localStringBuilder15.append(str2);
    StringBuilder localStringBuilder17 = localStringBuilder1.append("\nrefresh rate[帧每秒(fps)] : ");
    float f = paramDisplay.getRefreshRate();
    StringBuilder localStringBuilder18 = localStringBuilder17.append(f);
    StringBuilder localStringBuilder19 = localStringBuilder1.append("\n");
    String str3 = toStringForDisplayMetrics(displayMetrics);
    StringBuilder localStringBuilder20 = localStringBuilder19.append(str3);
    StringBuilder localStringBuilder21 = localStringBuilder1.append("\n");
    StringBuilder localStringBuilder22 = localStringBuilder1.append("}");
    return localStringBuilder1.toString();
  }

  public static String toStringForDisplayMetrics(DisplayMetrics paramDisplayMetrics)
  {
    StringBuilder localStringBuilder1 = new StringBuilder();
    StringBuilder localStringBuilder2 = localStringBuilder1.append("DisplayMetrics:{");
    if (paramDisplayMetrics != null)
    {
      StringBuilder localStringBuilder3 = localStringBuilder1.append("\ndensity : ");
      float f1 = paramDisplayMetrics.density;
      StringBuilder localStringBuilder4 = localStringBuilder3.append(f1);
      StringBuilder localStringBuilder5 = localStringBuilder1.append("\ndensityDpi : ");
      int i = paramDisplayMetrics.densityDpi;
      StringBuilder localStringBuilder6 = localStringBuilder5.append(i);
      StringBuilder localStringBuilder7 = localStringBuilder1.append("\nscaledDensity : ");
      float f2 = paramDisplayMetrics.scaledDensity;
      StringBuilder localStringBuilder8 = localStringBuilder7.append(f2);
      StringBuilder localStringBuilder9 = localStringBuilder1.append("\nxdpi : ");
      float f3 = paramDisplayMetrics.xdpi;
      StringBuilder localStringBuilder10 = localStringBuilder9.append(f3);
      StringBuilder localStringBuilder11 = localStringBuilder1.append("\nydpi : ");
      float f4 = paramDisplayMetrics.ydpi;
      StringBuilder localStringBuilder12 = localStringBuilder11.append(f4);
      StringBuilder localStringBuilder13 = localStringBuilder1.append("\nwidthPixels : ");
      int j = paramDisplayMetrics.widthPixels;
      StringBuilder localStringBuilder14 = localStringBuilder13.append(j);
      StringBuilder localStringBuilder15 = localStringBuilder1.append("\nheightPixels : ");
      int k = paramDisplayMetrics.heightPixels;
      StringBuilder localStringBuilder16 = localStringBuilder15.append(k);
      StringBuilder localStringBuilder17 = localStringBuilder1.append("\n");
      String str = printConstantDenstity();
      StringBuilder localStringBuilder18 = localStringBuilder17.append(str);
      StringBuilder localStringBuilder19 = localStringBuilder1.append("\n");
    }
    StringBuilder localStringBuilder20 = localStringBuilder1.append("}");
    return localStringBuilder1.toString();
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.android.views.DisplayUtil
 * JD-Core Version:    0.6.0
 */